<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<h:panelGroup rendered="#{empty buildingPermitHelper.fileSources}">
		<div align="center">
			<br/>
			<h:outputText value="#{messages['intro2.nodocsattached']}"/>
		</div>
	</h:panelGroup>
	<br />
	<rich:dataTable	 value="#{buildingPermitHelper.fileSources}"
			var="source" rowKeyVar="row" rendered="#{not empty buildingPermitHelper.fileSources}">
		<rich:column>
			<f:facet name="header">#{messages['intro2.description']}</f:facet>
			<h:outputText value="#{source.archive.description}"/>
		</rich:column>

		<rich:column>
			<f:facet name="header">#{messages['intro2.filename']}</f:facet>
			<h:outputText value="#{source.archive.name}"/>
		</rich:column>

		<rich:column>
			<h:commandLink action="/seam/resource/documentviewer" target="_blank">
				<f:setPropertyActionListener target="#{documentViewer.archiveId}" value="#{source.archive.sID}"/>
				<f:setPropertyActionListener target="#{documentViewer.forceDownload}" value="#{false}"/>
				<h:outputText value="#{messages['viewtransaction.viewattacheddoc']}"/>
			</h:commandLink>
		</rich:column>
	</rich:dataTable>

</ui:composition>
